package com.example.demo.producer.domain;

import com.example.demo.common.domain.ChannelRead;
import org.springframework.web.context.request.async.DeferredResult;

/**
 * @Auther Created by l.wang on 2019/4/2.
 */
public class TimeOutWork implements Runnable {

    private DeferredResult<ChannelRead> result;

    public TimeOutWork(DeferredResult<ChannelRead> result){
        this.result = result;
    }

    @Override
    public void run() {
        ChannelRead channelRead = new ChannelRead();
        channelRead.setMsg("返回超时信息");
        channelRead.setCode("402");
        result.setResult(channelRead);
        result.setErrorResult("aaa");
    }
}
